package jdk8;

import org.junit.Test;

import java.util.Arrays;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class StreamFlatMapTest {

    @Test
    public void testIntArray(){
        Integer[] integersA = new Integer[]{1,2,3};
        Integer[] integersB = new Integer[]{3,4};
        Arrays.asList(integersA);
        System.out.println(Stream.of(integersA,integersB).flatMap(integers -> Stream.of(integers)).collect(Collectors.toList()));
    }

}
